package com.fzrskj.cloud.free.core.tool;

import com.fzrskj.cloud.free.consts.CConsts;
import ms.core.tool.EncryptTool;

/**
 * CEncryptTool.
 *
 * @author zj.
 *         Created on 2018/8/30 0030.
 */
public class CEncryptTool extends EncryptTool {
    /**
     * password encode.
     * @param password
     * @return
     */
    public static String encodePassword(String password){
        return md5Encode(password+CConsts.STR_KEY);
    }

    /**to encrypt said,
     * @param sid session id
     * @param uid user account id
     * @param account user account
     * @return user login unique passport
     */
    public static String encodeSAID(String sid, int uid, String account){
        return sha1(sid+ CConsts.STR_KEY+uid+CConsts.STR_KEY+account);
    }
}
